-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cachable, proxy-friendly selendroid jar download. #36
Cachable, proxy-friendly selendroid jar download. #36
Conversation
Fixes #24 and also allows me to cache the download with an HTTP proxy. |
This travis build failed when installing appium-selendroid-driver: https://travis-ci.org/appium/appium-selendroid-driver/jobs/158700317 ...saying:
It then tries to run the unit tests anyway, which fail since there's no apk or manifest. When I download the jar locally, I still get the checked-in fingerprints:
|
Is this error something to do with Node 6? It seems to work fine in 4 and 5. |
Tested locally with node 5.4.1 before submitting, but not 6.2.1, which breaks. This is fixed by using Buffer not String to hold body: 27569b2. |
That would be why we test against multiple versions! |
Thanks for this! It's awesome! One thing: can you squash into a single commit? Then we can get it in. |
* Download using http from maven central, not https from github. Using http avoids many proxy-related problems and makes caching easier. Not using github means can use http and also avoids a redirection to a temporary and therefore extra-hard-to-cache URL. * Download via temporary file, throwing exception if fail, to ensure other code can't see bad download. * Use SHA256 not MD5 fingerprint, to compensate for use of http. * Only check fingerprint on download, but fail if it is wrong instead of just logging warning. * Use Buffer, not String to hold body. Download using http (from maven central, not github) via temporary file, throwing exception if fail.
da7d773
to
3325a8b
Compare
It's now squashed to one commit. |
Awesome! Thank you very much for this. |
Published as |
http avoids many proxy-related problems and makes caching
easier. Not using github means can use http and also avoids a
redirection to a temporary and therefore extra-hard-to-cache URL.
other code can't see bad download.
of just logging warning.